<%@page import="tx.bjdacp.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title><%=DrugSellUnit.TABLE_ALIAS%> 维护</title>

	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>
<link rel="stylesheet" type="text/css" href="<c:url value="/widgets/jquery-easyui/themes/default/easyui.css"/>">
	<link rel="stylesheet" type="text/css" href="<c:url value="/widgets/jquery-easyui/themes/icon.css"/>">
	<script type="text/javascript" src="<c:url value="/widgets/jquery-easyui/jquery.easyui.min.js"/>"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
		function queryHistory(obj){
			getReferenceForm(obj).target='_blank';
			getReferenceForm(obj).action='${ctx}/pages/DrugSellUnitModifyLog/list.do';
			//getReferenceForm(obj).target='';
			//alert('aa');
		}
	</script>
</rapid:override>

<rapid:override name="content">
<s:bean name="tx.bjdacp.service.ZoneManager" var="zoneManager" ></s:bean>
<s:bean name="tx.bjdacp.service.DataDictManager" var="dataDictManager" ></s:bean>

<form id="queryForm" name="queryForm" action="<c:url value="/pages/DrugSellUnit/listSupGspGather.do"/>" method="post" style="display: inline;">
	<div class="queryPanel">
		<fieldset>
			<legend>搜索</legend>
			<table>
				<tr>
					<td class="tdLabel">年度</td>
						<td>
		<input value="${query.year}" onclick="WdatePicker({dateFmt:'yyyy'})" id="year" name="year"  class="" />
		</td>
					</td>
				</tr>
			</table>
		</fieldset>
		<div class="handleControl">
			<input type="submit" class="stdButton" style="width:80px" value="查询" onclick="getReferenceForm(this).action='${ctx}/pages/DrugSellUnit/listSupGspGather.do'"/>
			<input type="submit" class="stdButton" style="width:80px" value="导出Excel" onclick="getReferenceForm(this).action='${ctx}/pages/DrugSellUnit/listSupGspGatherExcel.do'"/>

		<div>
	</div>

	<div class="gridTable">

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>

		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>

			  <tr>

				<th sortColumn="file_number" ><%=DrugSellUnit.ALIAS_FILE_NUMBER%></th>
				<th sortColumn="zone_id" >所在镇</th>
				<th sortColumn="unit_name" ><%=DrugSellUnit.ALIAS_UNIT_NAME%></th>
				<th  >监督检查</th>
				<th  >GSP跟踪检查</th>
				<th  >GSP认证</th>
			  </tr>

		  </thead>
		  <tbody>
		  	  <c:forEach items="${page.result}" var="item" varStatus="status">

			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">

				<td><c:out value='${item.fileNumber}'/>&nbsp;</td>
				<td><c:out value='${item.zoneName}'/>&nbsp;</td>
				<td><c:out value='${item.unitName}'/>&nbsp;</td>
				<td>&nbsp;
						<c:forEach items="${item.superviseInfos}" var="si" varStatus="status">
							${si.superviseDate} , ${si.superviseType} , ${si.superviseResult} , ${si.dightInfo}, ${si.supervisePerson}</br>
						</c:forEach>
				</td>
				<td>&nbsp;
						<c:forEach items="${item.superviseInfosAuditTrail}" var="si_gsp" varStatus="status">
							${si_gsp.superviseDate} , ${si_gsp.superviseType} , ${si_gsp.superviseResult} , ${si_gsp.dightInfo}, ${si_gsp.supervisePerson}</br>
						</c:forEach>
				</td>
				<td>&nbsp;
						<c:forEach items="${item.gspInfos}" var="gspInfo" varStatus="status">
							${gspInfo.gspGiveDate} , ${gspInfo.gspCode} </br>
						</c:forEach>
				</td>

			  </tr>

		  	  </c:forEach>
		  </tbody>
		</table>

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>
	</div>
	</form>
</rapid:override>

<%-- jsp模板继承,具体使用请查看: http://code.google.com/p/rapid-framework/wiki/rapid_jsp_extends --%>
<%@ include file="base.jsp" %>

